package com.diu.test;

import com.diu.infrastructure.persistent.redis.IRedisService;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest
public class ApiTest {
    @Autowired
    private IRedisService redisService;

    @Test
    public void test() {
        log.info("测试完成");
    }

    @Test
    public void testRedis(){
//        RMap<Object, Object> map = redisService.getMap("test");
//        map.put("1", "1");
//        map.put("2", "2");
//        map.put("3", "3");
//        map.put("4", "4");
        log.info("map: {}", redisService.getFromMap("test", "2"));
    }

}
